<Page id="1" templateExtension="html" relativePath="." fullRelativePath="." secured="False" urlType="Relative" isIncluded="False" SSLAccess="False" wizardTheme="Clear" wizardThemeType="File" needGeneration="0">
	<Components>
		<Grid id="2" secured="False" sourceType="SQL" returnValueType="Number" defaultPageSize="10" name="ITEM" connection="projectkar" dataSource="select Q1.id item_id,Q1.item_name,Q1.money,
            Q2.total_earned,Q3.sold_num,Q4.suggested_num
from
 (SELECT ALL ITEM.NAME item_name, ITEM.ID id,  
  ITEM.MONEY, ITEM.CRT_DATE, ITEM_CATEGORY.NAME category_name,item.USE_ID user_id
  FROM ITEM, ITEM_CATEGORY
  WHERE (ITEM.ITE_ID = ITEM_CATEGORY.ID)) Q1,
 (SELECT ALL ITEM.ID, nvl(sum(BUYED.MONEY),0) total_earned
 FROM ITEM, BUYED
 WHERE (BUYED.ITE_ID (+)= ITEM.ID) 
 group by item.id) Q2,
 (SELECT ALL ITEM.ID, nvl(count(BUYED.ID),0) sold_num
 FROM ITEM, BUYED
 WHERE (BUYED.ITE_ID (+)= ITEM.ID)
 GROUP BY ITEM.ID) Q3,
 (SELECT ALL ITEM.ID, nvl(count(SUGGEST.ID),0) suggested_num
 FROM ITEM, SUGGEST
 WHERE (SUGGEST.ITE_ID (+)= ITEM.ID)
 GROUP BY ITEM.ID) Q4
where (
  (Q1.id=Q2.id 
  and Q2.id=Q3.id
  and Q3.id=Q4.id)
  AND Q1.user_id={USER_ID}
)" pageSizeLimit="100" wizardCaption="List of ITEM " wizardTheme="Clear" wizardThemeType="File" wizardGridType="Tabular" wizardAllowInsert="False" wizardAltRecord="False" wizardRecordSeparator="False" parameterTypeListName="ParameterTypeList" activeCollection="SQLParameters">
			<Components>
				<Label id="3" fieldSourceType="DBColumn" dataType="Text" html="False" editable="False" name="ITEM_TotalRecords" wizardTheme="Clear" wizardThemeType="File" wizardUseTemplateBlock="False">
					<Components/>
					<Events>
						<Event name="BeforeShow" type="Server">
							<Actions>
								<Action actionName="Retrieve number of records" actionCategory="Database" id="4"/>
							</Actions>
						</Event>
					</Events>
				</Label>
				<Label id="5" fieldSourceType="DBColumn" dataType="Text" html="False" editable="False" name="NAME" fieldSource="ITEM_NAME" wizardCaption="NAME" wizardTheme="Clear" wizardThemeType="File" wizardSize="20" wizardMaxLength="20" wizardIsPassword="False" wizardUseTemplateBlock="False">
					<Components/>
					<Events/>
				</Label>
				<Label id="6" fieldSourceType="DBColumn" dataType="Float" html="False" editable="False" name="MONEY" fieldSource="MONEY" wizardCaption="MONEY" wizardTheme="Clear" wizardThemeType="File" wizardSize="12" wizardMaxLength="12" wizardIsPassword="False" wizardUseTemplateBlock="False">
					<Components/>
					<Events/>
				</Label>
				<Label id="7" fieldSourceType="DBColumn" dataType="Float" html="False" editable="False" name="TOTAL_EARNED" fieldSource="TOTAL_EARNED" wizardCaption="ID" wizardTheme="Clear" wizardThemeType="File" wizardSize="12" wizardMaxLength="12" wizardIsPassword="False" wizardUseTemplateBlock="False">
					<Components/>
					<Events/>
				</Label>
				<Label id="8" fieldSourceType="DBColumn" dataType="Float" html="False" editable="False" name="SOLD_NUM" fieldSource="SOLD_NUM" wizardCaption="USE ID" wizardTheme="Clear" wizardThemeType="File" wizardSize="12" wizardMaxLength="12" wizardIsPassword="False" wizardUseTemplateBlock="False">
					<Components/>
					<Events/>
				</Label>
				<Label id="9" fieldSourceType="DBColumn" dataType="Float" html="False" editable="False" name="SUGGESTED_NUM" fieldSource="SUGGESTED_NUM" wizardCaption="ID" wizardTheme="Clear" wizardThemeType="File" wizardSize="12" wizardMaxLength="12" wizardIsPassword="False" wizardUseTemplateBlock="False">
					<Components/>
					<Events/>
				</Label>
				<Link id="12" fieldSourceType="DBColumn" dataType="Text" html="False" hrefType="Page" urlType="Relative" preserveParameters="GET" editable="False" name="stop_selling" wizardTheme="Clear" wizardThemeType="File">
					<Components/>
					<Events/>
					<LinkParameters>
						<LinkParameter id="17" sourceType="DataField" name="ITEM_ID" source="ITEM_ID"/>
					</LinkParameters>
				</Link>
				<Link id="13" fieldSourceType="DBColumn" dataType="Text" html="False" hrefType="Page" urlType="Relative" preserveParameters="GET" editable="False" name="delete_item" wizardTheme="Clear" wizardThemeType="File">
					<Components/>
					<Events/>
					<LinkParameters>
						<LinkParameter id="18" sourceType="DataField" name="ITEM_ID" source="ITEM_ID"/>
					</LinkParameters>
				</Link>
				<Link id="14" fieldSourceType="DBColumn" dataType="Text" html="False" hrefType="Page" urlType="Relative" preserveParameters="GET" editable="False" name="see_buyed_instances" wizardTheme="Clear" wizardThemeType="File">
					<Components/>
					<Events/>
					<LinkParameters>
						<LinkParameter id="19" sourceType="DataField" name="ITEM_ID" source="ITEM_ID"/>
					</LinkParameters>
				</Link>
				<Link id="15" fieldSourceType="DBColumn" dataType="Text" html="False" hrefType="Page" urlType="Relative" preserveParameters="GET" editable="False" name="see_requests_for_buy" wizardTheme="Clear" wizardThemeType="File">
					<Components/>
					<Events/>
					<LinkParameters>
						<LinkParameter id="20" sourceType="DataField" name="ITEM_ID" source="ITEM_ID"/>
					</LinkParameters>
				</Link>
				<Link id="16" fieldSourceType="DBColumn" dataType="Text" html="False" hrefType="Page" urlType="Relative" preserveParameters="GET" editable="False" name="modify_item_for_sell" wizardTheme="Clear" wizardThemeType="File">
					<Components/>
					<Events/>
					<LinkParameters>
						<LinkParameter id="21" sourceType="DataField" name="ITEM_ID" source="ITEM_ID"/>
					</LinkParameters>
				</Link>
				<Navigator id="10" name="Navigator" wizardPagingType="ImageButtons" wizardFirst="False" wizardFirstText="First" wizardPrev="True" wizardPrevText="Prev" wizardNext="True" wizardNextText="Next" wizardLast="False" wizardLastText="Last" wizardImages="True" wizardSize="10" wizardTotalPages="False" wizardHideDisabled="False" wizardOfText="of" wizardTheme="Clear" wizardThemeType="File" wizardImagesScheme="Clear" type="Simple">
					<Components/>
					<Events/>
				</Navigator>
			</Components>
			<Events/>
			<TableParameters/>
			<JoinTables/>
			<JoinLinks/>
			<Fields/>
			<SPParameters/>
			<SQLParameters>
				<SQLParameter id="11" variable="USER_ID" parameterType="Session" defaultValue="-1" dataType="Integer" format="0;(0)" parameterSource="USER_ID"/>
			</SQLParameters>
			<SecurityGroups/>
		</Grid>
	</Components>
	<CodeFiles>
		<CodeFile id="Model" language="JSP" name="see_my_items_for_sell.xml" path="." comment="&lt;!--" commentEnd="--&gt;" codePage="iso-8859-1" forShow="False"/>
		<CodeFile id="JSP" language="JSP" name="see_my_items_for_sell.jsp" path="." comment="&lt;%--" commentEnd="--%&gt;" codePage="iso-8859-1" forShow="True" url="see_my_items_for_sell.jsp"/>
		<CodeFile id="Handlers" language="JSP" name="see_my_items_for_sellHandlers.jsp" path="." comment="//" codePage="iso-8859-1" forShow="False"/>
	</CodeFiles>
	<SecurityGroups/>
	<Events/>
</Page>
